Skip to content

fix(provider): Nemotron Super saves native-precision prefix checkpoints, so a cache hit restores exactly - #2002

Merged
jonathan308 merged 5 commits into
devfrom
fix/super-native-checkpoints
Nov 12, 2026
Merged

jonathan308 merged 5 commits into
devfrom
fix/super-native-checkpoints

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

For 0.10.12 candidate (c) (#1970). Approved in an independent review (review-2002.md); passed window 11's real-Mac check (3/3 restored = cold, bit for bit). Nemotron Super's prompt cache now restores exactly: Super's complete SSD prefix checkpoints default to native precision, so a cache hit returns exactly what a cold prefill returns.

Why. On the production Super weights (aggregate 56a1f05e…), answers restored from 8,192 tokens differed from cold ones on reasoning prompts (3 of 3). At each divergence point the top-2 logprob gap moved by about 0.5 nats. The cause is the storage profile, not chunking or MTP. Production's default checkpoint precision is balanced, which stores older attention rows as 4-bit K/V; the Mamba conv/SSM state and the MTP history were already exact. With native checkpoints the restored state matched the chunked cold prefill bit for bit: 64 of 64 logprob steps, 20 of 20 forced pairs and restored text = cold, 2 of 2. (Window 9, Mac A, in-process pinnedCheckpointCheckpointProfileQualification.)

The fix (one line, Super only). NemotronSuperLocalPrefixCache.checkpointPrecision, now the only place where Super's checkpoint precision is resolved, gives Super a per-model default of native:

byModel: [modelID: EngineV2KVQuantizationSelection.native.rawValue].merging(byModel) { $1 },
  • The operator's own per-model entry for Super (engine_v2_kv_checkpoint_quantization_by_model) and DARKBLOOM_CBV2_CHECKPOINT_QUANTIZATION still win, in the shared order.
  • The global engine_v2_kv_checkpoint_quantization no longer applies to Super. A saved provider.toml spells it out as balanced, so it can't be read as a choice.
  • Not changed: the SDK's PagedKVQuantizationPolicy (the fork; nativeCheckpointModelTypes is ["nemotron_h"] on (c)'s SDK 505e6bd87c and absent from dev's 67110e7b), every other model, Lightning, pairs and live KV.
  • Why not add nemotron_h_omni to nativeCheckpointModelTypes: that is an SDK change on an owner-only fork, dev can't build it, and (c)'s otherFamiliesKeepTheirCheckpointDefault pins nemotron_h_omni → balanced at the SDK level. The per-model default reaches only Super.
  • Difference from Lightning: for Lightning, an explicit global k4v4/k8v4/k8v8 still applies; for Super only its own per-model entry or the switch does.
flowchart LR
  subgraph Before
    B1["Super load"] --> B2["resolve(nemotron_h_omni): switch, Super's entry, global (saved: balanced)"] --> B3["balanced: older K/V rows 4-bit"] --> B4["restore ≠ cold on reasoning prompts"]
  end
  subgraph After
    A1["Super load"] --> A2["checkpointPrecision: switch, Super's entry, else native"] --> A3["native rows"] --> A4["restore = cold, bit for bit"]
  end
Loading

Cost and the SSD tier

  • Per checkpoint: 8,192 tokens is 249,461,108 bytes native vs 204,044,844 bytes balanced (+22 %); 2,048 tokens is 192,806,201 vs 181,992,897 bytes. That is about 174 MB of fixed conv/SSM/MTP state plus about 9.2 KB per token native (vs about 3.6 KB balanced). An 8.6K-token prompt writes 442 vs 386 MB (+15 %).
  • There is no per-model SSD cap. The SSD tier has:
    • a box-wide disk budget, free / 2 or DARKBLOOM_PREFIX_CACHE_DISK_GB (PrefixCachePolicy.ssdDiskBudgetBytes), with oldest-first eviction across models;
    • a root-wide write cap of 4 TB per day (SSDPrefixCachePolicy.maxWriteBytesPerDay);
    • a per-file cap: a capture is written only if it fits completeCheckpointMaxStageBytes, which is 7 GiB and 15 s on Macs with at least 48 GiB of memory (SSDHybridCheckpointStore.swift:178).
  • What this changes: none of these limits. A native checkpoint at Super's whole 262,144-token context is about 2.6 GB, below the 7 GiB per-file cap, so no depth stops being cached. The same disk budget simply holds fewer Super checkpoints, and the extra writes are far from 4 TB a day.
  • Existing checkpoints: the storage profile is part of the store's identity (layout native-paged-full-recurrent-v1 vs native-paged-affine-checkpoint-full-recurrent-mtp-v1), so existing balanced Super checkpoints stop matching. They age out within their 30-minute TTL through whole-root maintenance.

Validation

CPU only: a sandbox that denies the GPU's user clients and ~/.darkbloom*, prod identity, built after wait-build-slot.sh with MIN_FREE=22, base dev 420a5123c4 (SDK 67110e7b). Evidence: ~/build/merge/mainnet/super-native-1111/evidence/.

Tree Result
Red eb578e77ed (the resolution moved into checkpointPrecision, unchanged, plus the test) checkpointsDefaultToNativePrecision fails with 7 issues: Super resolves .balanced under a global balanced, "" or k4v4, .k8v4/.k8v8 under those globals, and .balanced for the binding id and beside another model's entry
Green 7e331affc7 it passes; ownersWithoutABankKeepDurableCheckpointsByDefault and EngineV2KVQuantizationPolicyTests (7) pass
Mutant: the native entry dropped (byModel: byModel) killed (7 issues)
Mutant: the default wins over the operator ({ current, _ in current }) killed (2 issues: Super's per-model balanced and k8v8)
Refactor pass 04b61e8d9a comments only; rebuilt, the same three suites pass; git diff --check; changelog.py check (72); docs-check.sh (211 files OK); docs-impact-check --base 420a5123c4 (6 files, coverage OK)
CI on 04b61e8d9a shard 1 failed with 4 issues, all in NemotronSuperManagedSlotTests.coordinatorRequestsWriteAndRestoreDurableCheckpoints (Metal), which pinned the old default. With the global default balanced, the managed slot built through ProviderLoop now gets the native layout and reports .native: the fix reaches the production load path end to end. Shard 2 passed
68edb33d90 (test only) that test now expects the native layout and .native. perModelCheckpointPrecisionReachesTheDurableStore now sets Super's per-model entry to balanced (the coded MTP layout and .balanced), so it still proves the operator's setting reaches the store. Both are Metal tests, so CI runs them
CI on 68edb33d90 green (run 42987676147, 08:53Z). Shard 1: the two managed-slot tests pass. Shard 2: checkpointsDefaultToNativePrecision, and durableCheckpointsRestoreAcrossAnOwnerRestart in all 4 cases (native restore = cold text)
76c052dc83 (text only; review-2002) ssd-kv-cache.md (must-fix: the Super slot writes native-paged-full-recurrent-v1 by default, the global does not apply, Super's entry or the switch selects the affine layouts; deltas on the target-only owner); Super added to the references through new lines: a provider.toml row in cli-reference.md, a row in configuration.md's managed Super table and a sentence in kv-cache-quantization.md's intro. (c)'s Lightning rows are untouched, so the fold stays clean; the stamps are unchanged for the same reason. Changelog: the measurement (3/3 ~8,600-token prompts restored from 8,192 = uncached, bit for bit, M5 Ultra) and the sizes (249 vs 204 MB at 8,192; 457 vs 285 MB at 30,720). docs-check 211 (dev) / 212 on (c) + this head (tree 899a238000), changelog.py check 72 / 111, docs-impact-check OK, git diff --check
Fold target: (c) 71be7fd9ae + head 68edb33d90 (local merge 915b062754, tree d745e33713, SDK 505e6bd87c) build rc 0, so the tests compile; the new test, the durable-identity test and EngineV2KVQuantizationPolicyTests 9/9 pass, including (c)'s Lightning test and its SDK-level nemotron_h_omni → balanced pin

Not run here: the Metal suites, including NemotronSuperDurablePrefixCacheTests.durableCheckpointsRestoreAcrossAnOwnerRestart, which already holds native restores = cold text on a fixture. CI runs them. A 20-minute real-Mac check gates the fold: the window agent runs the same 3 reasoning prompts on Mac A, on (c) + this PR with the switch unset, and requires restored = cold bit for bit.

The gated live test (NemotronSuperManagedSlotLiveTests+CheckpointProfile) gains a default arm (switch unset, expects the native layout) and now fails when a native restore's text or logprob row differs from cold. It runs only with DARKBLOOM_SUPER_CHECKPOINT_PROFILE_LIVE=1.

Folding

  • git merge-tree of head 76c052dc83 onto (c) Release preparation: provider 0.10.12 into dev #1970 71be7fd9ae is clean (tree 899a238000), and onto dev 420a5123c4 it is clean too. Re-run it at fold time.
  • Window 9's local diagnostic diff (checkpoint-profile-window9.diff) still applies on top.

Refactor pass

I did the pass myself (comments only). This worker could not delegate, so the independent refactor pass and review are the parent's gate.

Limitations

  • A blank per-model entry or switch for Super ("") resolves the provider-wide checkpoint default (balanced), as it does for every model. The LaunchAgent drops empty variables.
  • Docs: Super's default is now in inference.md, ssd-kv-cache.md, configuration.md (the managed Super table), cli-reference.md (a row for Super's per-model entry) and kv-cache-quantization.md (the intro). Two places still state only the generic default: the DARKBLOOM_CBV2_CHECKPOINT_QUANTIZATION row's Default cell and the global row in cli-reference.md. (c) rewrote both lines for Lightning, so editing them here would conflict at the fold. The four pages' stamps stay as they are for the same reason; (c) carries 2026-11-10.

Contracts and documentation

  • No protocol, telemetry or interface change. The precision is already part of the store's identity.
  • docs/architecture/inference.md, docs/reference/ssd-kv-cache.md, docs/reference/configuration.md, docs/provider/cli-reference.md, docs/architecture/kv-cache-quantization.md.
  • changelog.d/nemotron-super-native-checkpoints.md.

jonathan308 and others added 3 commits November 10, 2026 23:51
… precision (red)

A cache hit on Super's complete SSD checkpoints should return exactly what a
cold prefill returns. Today Super's checkpoint precision resolves to the
provider-wide default, balanced, which codes older attention rows to 4 bits:
on the production weights a restore from 8,192 tokens moved reasoning answers
off the cold ones (3 of 3), while native checkpoints matched the chunked cold
prefill bit for bit (64 of 64 steps).

The resolution moves into NemotronSuperLocalPrefixCache.checkpointPrecision,
unchanged, so a CPU test can name it. The test fails: it resolves balanced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Super's per-model checkpoint precision now defaults to native, so a restore
from its complete SSD checkpoints continues a cold prefill bit for bit. On the
production weights (aggregate 56a1f05e) native restores from 8,192 tokens
matched the cold run in 64 of 64 logprob steps and 20 of 20 forced pairs,
while balanced ones (4-bit older attention rows) moved 3 of 3 reasoning
answers. The conv/SSM state was already exact.

The operator's per-model entry for Super and DARKBLOOM_CBV2_CHECKPOINT_QUANTIZATION
still win; the global setting, which a saved provider.toml spells out as
balanced, no longer applies to Super. Only Super's resolution changes: the
SDK's shared policy and every other model are untouched.

Cost: an 8,192-token checkpoint is about 249 MB instead of 204 MB. The SSD
tier has no per-model cap; the box-wide budget (free/2), the 4 TB/day write
cap and the per-file stage cap (7 GiB on >= 48 GiB Macs) are unchanged, and
a full 262,144-token native checkpoint (~2.6 GB) stays under the stage cap.

The gated checkpoint-profile live test gains a default arm (switch unset),
which expects the native layout, and fails when a native restore differs
from cold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ents only)

The precision helper's comment leads with the default and its reason; the
live profile test's header is rewrapped. No code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 11, 2026 9:40am UTC
darkbloom-status Ready Ready Preview Nov 11, 2026 9:40am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 11, 2026 9:40am UTC

Request Review

…ve by default

CI found the managed-slot test that pinned the old default: the coordinator
path's store took the balanced layout. With the global default `balanced`, the
slot now builds the native layout and reports native checkpoint precision,
end to end through ProviderLoop's managed load. The per-model test now sets
Super's entry to `balanced`, so it still shows the operator's setting reaching
the store (the coded layout beside the assistant's exact history).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reference, the reference rows, the changelog

Text only (review-2002).
- ssd-kv-cache.md (must-fix): the managed Super slot writes
  native-paged-full-recurrent-v1 by default. The global setting does not
  apply; Super's own per-model entry or the switch selects a profile, whose
  affine layouts the paragraph keeps. Native files can be deltas on the
  target-only owner; the speculating owner's MTP history keeps complete files.
- Super in the reference rows: a provider.toml row for Super's per-model entry
  (cli-reference.md), a row in configuration.md's managed Super slot table,
  and a sentence in kv-cache-quantization.md's introduction. The rows that
  candidate (c) rewrote for Lightning are left alone, so the fold stays clean.
- Changelog: what was measured (3 of 3 ~8,600-token reasoning prompts restored
  from 8,192 = uncached, bit for bit, on an M5 Ultra; balanced changed all 3),
  the sizes at 8,192 and 30,720 tokens, and that an explicit global k4v4,
  k8v4 or k8v8 does not apply to Super either.

The pages' "Last updated" stamps are unchanged: candidate (c) restamps all
four on the same line, so a restamp here would conflict at the fold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

3 active deployments
Preview – d-inference-landing — 76c052dc Deployed Nov 11, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 76c052dc Deployed Nov 11, 2026 by vercel[bot]
Preview – darkbloom-status — 76c052dc Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant